<!DOCTYPE html>
<html lang="zh-CN">
<head>
	<title>${(metadata.alias)!}</title>
	<@tools.includePlace path="/76c53ac2-4f88-4ef3-984b-c81d00a48089.html"/> <#-- 头部Header -->
</head>
<body>
<@tools.includePlace path="/23e95a91-0063-4498-99ef-aa3fc4a79c4c.html"/> <#-- 导航 -->
<main>
	<div class="container  clearfix-after">
		<@tools.includePlace path="/c936c718-5f19-426f-b3ff-13a5a8d63044.html"/> <#-- 个人中心导航 -->
		<div class="right-content">
			<div class="box">
				<@import path="/ftl/tools.ftl" namespace="t"/><#-- 工具 -->
				<div class="comment-box">
					<h3>我的点赞</h3>
					<@cms.userScoreList userId=user.id pageIndex=pageIndex pageSize=10>
					<ul>
						<#list page.list as a>
							<#if 'content'=a.id.itemType><@t.merge 'contentIds' a.id.itemId!/></#if>
						</#list>
						<@cms.content ids=t.contentIds! absoluteURL=true><#assign contentMap=map!/></@cms.content>
						<#list page.list as a>
							<li class="underline">
								<p><#if 'content'=a.id.itemType>${a.createDate?date} 点赞了《<a href="${contentMap[a.id.itemId?string].url}" target="_blank">${contentMap[a.id.itemId?string].title}</a>》</#if><span class="float-right"><a href="javascript:unstar(${a.id.itemId},'${a.id.itemType}');">取消点赞</a></span></p>
							</li>
						<#else>
						<li class="underline"><p>没有数据</p></li>
						</#list>
					</ul>
					<div class="page">
						<#assign
						start=1
						end=page.totalPage
						/>
						<#if (page.pageIndex-5) gt start>
						<#assign start=page.pageIndex-4/>
						</#if>
						<#if (page.pageIndex+5) lt end>
						<#assign end=page.pageIndex+4/>
						</#if>
						<#if !page.firstPage>
						<a href="${getPage('myScore.html',page.prePage,'pageIndex')}">上一页</a>
						<#else>
						<span>上一页</span>
						</#if>
						<#if start gt 1>
						<a href="${'myScore.html'}">1</a> ...
						</#if>
						<#list start..end as n>
						<a href="${getPage('myScore.html',n,'pageIndex')}"${(n=page.pageIndex)?then(' class="selected"'?no_esc,'')}>${n}</a>
						</#list>
						<#if end lt page.totalPage>
						... <a href="${getPage('myScore.html',page.totalPage,'pageIndex')}">${page.totalPage}</a>
						</#if>
						<#if !page.lastPage>
						<a href="${getPage('myScore.html',page.nextPage,'pageIndex')}">下一页</a>
						<#else>
						<span>下一页</span>
						</#if>
					</div>
					</@cms.userScoreList>					
				</div>				
			</div>
		</div>
	</div>
</main>
	<script>
		var templatePath='${.current_template_name?keep_after('/')}';
	</script>
<@tools.includePlace path="/cc29e896-332a-46d8-9bcb-d48e92144e9c.html"/> <#-- 尾部Footer -->
<script>
function unstar(itemId,itemType){
    $.getJSON('${site.dynamicPath}score/unscore?itemId='+itemId+'&itemType='+itemType+'&_csrf=<@tools.csrfToken/>', function(data){
        location.reload();
    });
}
    </script>
</body>
</html>
